<?php
namespace app\serverexchangerate\validate;
use \app\manage\validate\BaseValidate;

class Exchangerate extends BaseValidate
{
    
	protected $rule =   [
        'id' => ['integer','gt'=>0],
        'max_price' => ['integer','gt'=>0],
        'min_price' => ['integer','gt'=>0, 'elt'=>'max_price'],
        'open_price' => ['integer','gt'=>0, 'elt'=>'max_price', 'egt'=>'min_price'],
        'close_price' => ['integer','gt'=>0, 'elt'=>'max_price', 'egt'=>'min_price'],
        'now_price' => ['integer','gt'=>0, 'elt'=>'max_price', 'egt'=>'min_price'],
		
    ];

    protected $message  =   [
        'min_price' => ['elt'=>'最低价格必须小于最高价格'],
        'open_price' => ['elt'=>'开盘价必须小于最高价格','egt'=>'开盘价必须高于最低价格'],
        'close_price' => ['elt'=>'收盘价必须小于最高价格','egt'=>'收盘价必须高于最低价格'],
        'now_price' => ['elt'=>'当前价必须小于最高价格','egt'=>'当前价必须高于最低价格'],
    ];

    protected $scene = [
        
    ];

}